package com.tduck.cloud.account.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tduck.cloud.account.entity.RoleEntity;
import com.tduck.cloud.account.mapper.RoleMapper;
import com.tduck.cloud.account.service.RoleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 角色服务impl
 *
 * @author Guard Baby
 * @date 2023/09/09
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, RoleEntity> implements RoleService {
    @Override
    public List<RoleEntity> getRoleByUserId(Long userId) {
        return this.baseMapper.getRoleByUserId(userId);
    }

    @Override
    public List<Long> getUserIdsByRoleIds(List<Long> roleIds) {
        return this.baseMapper.getUserIdsByRoleIds(roleIds);
    }
}
